
import {
	defineStore
} from 'pinia'

import {
	ref
} from 'vue'
export const userStore = defineStore("user", () => {

	let userInfo = ref({})
	let isLogin = ref(false)
	let currentPos=ref({
		longitude:0,
		latitude:0,
	})
	function addUserInfo(id, username, phone) {		
   //自行添加内容
	}
	// 清除用户登录状态
	function clearUserInfo() { 
//自行添加内容
	}
	function setPos(longitude,latitude){
		currentPos.value.longitude=longitude
		currentPos.value.latitude=latitude
		console.log(currentPos.value)
	}
	
	return {
		userInfo,
		isLogin, 
		addUserInfo,
		clearUserInfo, 
		setPos,
		currentPos,
	}
})